package com.itc.dispatch.controller;

import com.itc.common.core.domain.R;
import com.itc.common.log.enums.BusinessType;
import com.itc.dispatch.domain.OaDept;
import com.itc.dispatch.domain.vo.OaDeptTreeVo;
import com.itc.dispatch.service.OaDeptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;


@RestController
@RequestMapping("/oa/dept")
@Api(value = "oaDeptCon", tags = "OA部门用户管理模块")
public class OaDeptUserController {

    @Autowired
    private OaDeptService oaDeptService;

    /**
     * 获取OA通讯录树形
     */
    @ApiOperation(value = "获取OA通讯录树形")
    @PostMapping("/user/tree")
    public R<List<OaDeptTreeVo>> getDeptUserTree(@RequestBody OaDept dto){
        List<OaDeptTreeVo> resultData = oaDeptService.getDeptUserTree(dto);
        return R.ok(resultData);
    }


}
